﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="../../Scripts/jquery-1.11.1.js"></script>
    <script src="../../Scripts/ejq.js"></script>
    <title>使用异步</title>
    <script>

        $(function () {

            //申明模版引擎的作用域
            var model = $ejqApp.module("ng-app");
            //控制器操作
            model.controller("ctr1", function ($http) {

                $http.jsonList = { url: "json.json" };//默认 type: "get", cache:false ;

                //目前不能同时使用2个ajax会在最近修复这个bug

                });

            //初始化
            $ejqApp.apps.bind();

        })
    </script>
    <meta charset="utf-8" />
</head>
<body ng-app="ng-app">
    <div ng-controller="ctr1">
        <h3>ajax标题</h3>
        <table ng-repeat="item in  jsonList">
            <tr><td>{{item.desc}}</td><td>{{item.name}}</td></tr>

        </table>
    </div>
</body>
</html>
